<template>
  <div class="box" v-if="bu" :style="{ width, height }">
    <h1>{{ title }}</h1>
    <main>
      <slot></slot>
    </main>
    
   
  </div>
</template>
<script>
export default {
  name: '',
  data () {
    return {

    }
  },
  props: {
    bu: {
      type: Boolean
    },
    width: {
      type: String,
      default: '300px'
    },
    height: {
      type: String,
      default: '300px'
    },
    title: {
      type: String,

    }
  },
  beforeCreate () {
    console.log('beforeCreate---子');
  },
  created () {
    console.log('created---子');
  },
  beforeMount () {
    console.log('beforeMount---子');

  },
  mounted () {
    console.log('mounted---子');
  },
  beforeRouteUpdate () {
    console.log('beforeRouteUpdate---子');
  },
  updated () {
    console.log('updated---子');
  },
  beforeDestroy () {
    console.log('beforeDestroy---子');
  },
  destroyed () {
    console.log('destroyed---子');
  },
  computed: {
  },
  methods: {
   
  }
}
</script>
<style lang='less'  scoped>
.box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.5);
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow: scroll;
  main {
    flex: 1;
  }
}
// button {
//   width: 100px;
//   height: 100px;
//   text-align: center;
//   line-height: 100px;
//   font-size: 100px;
//   position: fixed;
//   right: 0;
//   top: 0;
// }
</style>
